package com.chart.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chart.chart.domian.ChartColor;
import com.chart.common.core.domain.AjaxResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface ChartColorMapper extends BaseMapper<ChartColor> {




@Update("UPDATE chart_color SET color_codes=#{colorCodes}, version=version+1 WHERE user_id=#{userId} AND version=#{version}")
boolean updateColors(@Param("userId") Long userId, @Param("colorCodes") String colorCodes, @Param("version") Integer version);


}
